



#ifndef _PDF_FONT_PARSER_H_
#define _PDF_FONT_PARSER_H_

#include <wx/arrstr.h>
#include <wx/string.h>
#include <wx/stream.h>

#include "wx/pdfdocdef.h"

/// Class representing font parsers
class WXDLLIMPEXP_PDFDOC wxPdfFontParser
{
public:
  /// Default constructor
  wxPdfFontParser();

  /// Default destructor
  virtual ~wxPdfFontParser();

  /// Seek to offset in default input stream
  
  void SeekI(int offset);

  /// Seek to offset in specific input stream
  
  void SeekI(int offset, wxInputStream* stream);

  /// Tell current position in default input stream
  
  int TellI();

  /// Tell current position in specific input stream
  
  int TellI(wxInputStream* stream);

  /// Skip bytes in default input stream
  
  void SkipBytes(int count);

  /// Skip bytes in specific input stream
  
  void SkipBytes(int count, wxInputStream* stream);

  /// Read integer from default input stream
  
  int ReadInt();

  /// Read short integer from default input stream
  
  short ReadShort();

  /// Read unsigned short integer from default input stream
  
  unsigned short ReadUShort();

  /// Read byte from default input stream
  
  unsigned char ReadByte();

  /// Read byte from specific input stream
  
  unsigned char ReadByte(wxInputStream* stream);

  /// Read string from default input stream
  
  wxString ReadString(int length);

  /// Read string from specific input stream
  
  wxString ReadString(int length, wxInputStream* stream);

  /// Read Unicode string from default input stream
  
  wxString ReadUnicodeString(int length);

  /// Read short integer from specific input stream in little endian mode
  
  short ReadShortLE(wxInputStream* stream);

  /// Read unsigned short integer from specific input stream in little endian mode
  
  unsigned short ReadUShortLE(wxInputStream* stream);

  /// Read unsigned integer from specific input stream in little endian mode
  
  unsigned int ReadUIntLE(wxInputStream* stream);

  /// Read string from specific input stream
  
  wxString ReadString(wxInputStream& stream);

protected:
  wxString              m_fileName; ///< File name of the font file
  wxString              m_fontName; ///< Name of font
  wxInputStream*        m_inFont;   ///< Font file input stream
  wxString              m_style;    
private:
};

#endif
